export default function Progress({text,percentage}) {
    // 看了一下阮一峰的es6手册
    percentage = percentage ?? 0; // es6 代码简洁  空值合并运算符 
    return (
        <div className="progress-container">
            <div className="progress-bar" style={{'width':`${percentage}%`}}>
                {text} {`${percentage.toFixed(2)}%`}
            </div>
        </div>
    )
}